package model

import (
	"database/sql"

	_ "github.com/lib/pq"
)

var DB *sql.DB

func init() {

	var err error

	DB, err = sql.Open("postgres", "user=postgres password=sanyuan dbname=sanyuan_app sslmode=disable")

	if err != nil {
		panic("连接数据库失败")
	}

}
